package system.model.request;

import common.model.enums.SysTopicIsClosedEnum;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author 米泽鹏
 * @since 2022-3-12 下午 2:33
 */
@Data
public class ToggleTopicClosedRequest {

	/**
	 * 话题id
	 */
	@NotNull(message = "话题id不能为空")
	private Long topicId;

	/**
	 * 话题是否已关闭
	 * {@link SysTopicIsClosedEnum}
	 */
	@NotBlank(message = "话题是否已关闭不能为空")
	@Pattern(regexp = "(^0$|^1$)", message = "话题是否已关闭只能为0或1")
	private String isClosed;

}
